home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8707 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 71 75 | 65 65 67 2e 61 70 63 69 |Path: qu|eeg.apci|
|00000010| 2e 6e 65 74 21 6e 65 77 | 73 0a 46 72 6f 6d 3a 20 |.net!new|s.From: |
|00000020| 4a 61 6d 65 73 20 4f 27 | 43 6f 6e 6e 6f 72 20 3c |James O'|Connor <|
|00000030| 6f 63 6f 6e 6e 6f 72 40 | 61 70 63 69 2e 6e 65 74 |oconnor@|apci.net|
|00000040| 3e 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 63 6f |>.Newsgr|oups: co|
|00000050| 6d 70 2e 6c 61 6e 67 2e | 63 2b 2b 0a 53 75 62 6a |mp.lang.|c++.Subj|
|00000060| 65 63 74 3a 20 52 65 3a | 20 41 63 63 65 73 73 20 |ect: Re:| Access |
|00000070| 43 4f 4d 20 70 6f 72 74 | 20 69 6e 20 4d 53 56 43 |COM port| in MSVC|
|00000080| 2b 2b 34 2e 30 0a 44 61 | 74 65 3a 20 53 75 6e 2c |++4.0.Da|te: Sun,|
|00000090| 20 32 35 20 46 65 62 20 | 31 39 39 36 20 32 32 3a | 25 Feb |1996 22:|
|000000a0| 31 35 3a 33 33 20 2d 30 | 38 30 30 0a 4f 72 67 61 |15:33 -0|800.Orga|
|000000b0| 6e 69 7a 61 74 69 6f 6e | 3a 20 41 70 70 6c 69 65 |nization|: Applie|
|000000c0| 64 20 50 65 72 73 6f 6e | 61 6c 20 43 6f 6d 70 75 |d Person|al Compu|
|000000d0| 74 69 6e 67 2c 20 49 6e | 63 2e 0a 4d 65 73 73 61 |ting, In|c..Messa|
|000000e0| 67 65 2d 49 44 3a 20 3c | 33 31 33 31 35 30 30 35 |ge-ID: <|31315005|
|000000f0| 2e 31 35 44 40 61 70 63 | 69 2e 6e 65 74 3e 0a 52 |.15D@apc|i.net>.R|
|00000100| 65 66 65 72 65 6e 63 65 | 73 3a 20 3c 34 67 72 62 |eference|s: <4grb|
|00000110| 38 61 24 6b 61 66 40 74 | 73 74 2e 68 6b 2e 73 75 |8a$kaf@t|st.hk.su|
|00000120| 70 65 72 2e 6e 65 74 3e | 0a 4e 4e 54 50 2d 50 6f |per.net>|.NNTP-Po|
|00000130| 73 74 69 6e 67 2d 48 6f | 73 74 3a 20 64 69 61 6c |sting-Ho|st: dial|
|00000140| 75 70 31 32 35 2e 61 70 | 63 69 2e 6e 65 74 0a 4d |up125.ap|ci.net.M|
|00000150| 69 6d 65 2d 56 65 72 73 | 69 6f 6e 3a 20 31 2e 30 |ime-Vers|ion: 1.0|
|00000160| 0a 43 6f 6e 74 65 6e 74 | 2d 54 79 70 65 3a 20 74 |.Content|-Type: t|
|00000170| 65 78 74 2f 70 6c 61 69 | 6e 3b 20 63 68 61 72 73 |ext/plai|n; chars|
|00000180| 65 74 3d 75 73 2d 61 73 | 63 69 69 0a 43 6f 6e 74 |et=us-as|cii.Cont|
|00000190| 65 6e 74 2d 54 72 61 6e | 73 66 65 72 2d 45 6e 63 |ent-Tran|sfer-Enc|
|000001a0| 6f 64 69 6e 67 3a 20 37 | 62 69 74 0a 58 2d 4d 61 |oding: 7|bit.X-Ma|
|000001b0| 69 6c 65 72 3a 20 4d 6f | 7a 69 6c 6c 61 20 32 2e |iler: Mo|zilla 2.|
|000001c0| 30 20 28 57 69 6e 31 36 | 3b 20 49 29 0a 54 6f 3a |0 (Win16|; I).To:|
|000001d0| 20 50 65 74 65 72 20 41 | 6c 65 78 61 6e 64 65 72 | Peter A|lexander|
|000001e0| 20 53 63 68 69 6e 64 6c | 65 72 20 3c 6d 6f 73 63 | Schindl|er <mosc|
|000001f0| 6f 77 40 6e 65 77 73 2e | 68 6b 2e 73 75 70 65 72 |ow@news.|hk.super|
|00000200| 2e 6e 65 74 3e 0a 0a 50 | 65 74 65 72 20 41 6c 65 |.net>..P|eter Ale|
|00000210| 78 61 6e 64 65 72 20 53 | 63 68 69 6e 64 6c 65 72 |xander S|chindler|
|00000220| 20 77 72 6f 74 65 3a 0a | 3e 20 0a 3e 20 48 61 73 | wrote:.|> .> Has|
|00000230| 20 61 6e 79 62 6f 64 79 | 20 74 72 69 65 64 20 74 | anybody| tried t|
|00000240| 6f 20 61 63 63 65 73 73 | 20 43 4f 4d 20 70 6f 72 |o access| COM por|
|00000250| 74 73 20 75 73 69 6e 67 | 20 74 68 65 20 41 50 49 |ts using| the API|
|00000260| 20 69 6e 20 4d 53 56 43 | 2b 2b 34 2e 30 3f 20 20 | in MSVC|++4.0? |
|00000270| 49 20 68 61 76 65 0a 3e | 20 62 65 65 6e 20 68 61 |I have.>| been ha|
|00000280| 76 69 6e 67 20 74 72 6f | 75 62 6c 65 73 20 75 73 |ving tro|ubles us|
|00000290| 69 6e 67 20 74 68 65 20 | 57 72 69 74 65 46 69 6c |ing the |WriteFil|
|000002a0| 65 28 29 20 66 75 6e 63 | 74 69 6f 6e 2e 20 20 54 |e() func|tion. T|
|000002b0| 68 65 20 63 6f 64 65 20 | 49 20 77 72 69 74 65 20 |he code |I write |
|000002c0| 69 73 0a 3e 20 6c 69 6b | 65 20 74 68 69 73 3a 0a |is.> lik|e this:.|
|000002d0| 3e 20 0a 3e 20 20 20 20 | 20 20 20 20 20 48 41 4e |> .> | HAN|
|000002e0| 44 4c 45 20 68 43 6f 6d | 3b 0a 3e 20 20 20 20 20 |DLE hCom|;.> |
|000002f0| 20 20 20 20 63 68 61 72 | 20 2a 62 75 66 66 65 72 | char| *buffer|
|00000300| 20 3d 20 22 78 78 78 22 | 3b 0a 3e 20 20 20 20 20 | = "xxx"|;.> |
|00000310| 20 20 20 20 4c 50 44 57 | 4f 52 44 20 6c 70 4e 75 | LPDW|ORD lpNu|
|00000320| 6d 4f 66 42 79 74 65 73 | 57 72 69 74 74 65 6e 3b |mOfBytes|Written;|
|00000330| 0a 3e 20 0a 3e 20 20 20 | 20 20 20 20 20 20 68 43 |.> .> | hC|
|00000340| 6f 6d 20 3d 20 43 72 65 | 61 74 65 46 69 6c 65 28 |om = Cre|ateFile(|
|00000350| 22 43 4f 4d 32 22 2c 20 | 47 45 4e 45 52 49 43 5f |"COM2", |GENERIC_|
|00000360| 52 45 41 44 7c 47 45 4e | 45 52 49 43 5f 57 52 49 |READ|GEN|ERIC_WRI|
|00000370| 54 45 0a 3e 20 20 20 20 | 20 20 20 20 20 20 20 20 |TE.> | |
|00000380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 30 2c 20 | | 0, |
|00000390| 4e 55 4c 4c 20 2c 20 4f | 50 45 4e 5f 45 58 49 53 |NULL , O|PEN_EXIS|
|000003a0| 54 49 4e 47 2c 20 30 2c | 20 4e 55 4c 4c 29 3b 0a |TING, 0,| NULL);.|
|000003b0| 3e 20 0a 3e 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |> .> | /* |
|000003c0| 63 68 65 63 6b 20 65 72 | 72 6f 72 20 68 65 72 65 |check er|ror here|
|000003d0| 2c 20 61 6e 64 20 74 68 | 69 6e 67 73 20 61 72 65 |, and th|ings are|
|000003e0| 20 6f 6b 20 2a 2f 0a 3e | 20 20 20 20 20 20 20 20 | ok */.>| |
|000003f0| 20 2f 2a 20 73 65 74 20 | 63 6f 6d 6d 20 70 61 72 | /* set |comm par|
|00000400| 61 6d 65 74 65 72 73 20 | 2a 2f 0a 3e 20 0a 3e 20 |ameters |*/.> .> |
|00000410| 20 20 20 20 20 20 20 20 | 57 72 69 74 65 46 69 6c | |WriteFil|
|00000420| 65 28 68 43 6f 6d 2c 20 | 28 4c 50 43 56 4f 49 44 |e(hCom, |(LPCVOID|
|00000430| 29 26 62 75 66 66 65 72 | 2c 20 73 69 7a 65 6f 66 |)&buffer|, sizeof|
|00000440| 28 62 75 66 66 65 72 29 | 2c 0a 3e 20 20 20 20 20 |(buffer)|,.> |
|00000450| 20 20 20 20 20 20 20 20 | 20 20 20 20 6c 70 4e 75 | | lpNu|
|00000460| 6d 4f 66 42 79 74 65 73 | 57 72 69 74 74 65 6e 2c |mOfBytes|Written,|
|00000470| 20 4e 55 4c 4c 29 3b 0a | 3e 20 0a 3e 20 54 68 65 | NULL);.|> .> The|
|00000480| 20 65 72 72 6f 72 20 45 | 52 52 4f 52 5f 49 4e 56 | error E|RROR_INV|
|00000490| 41 4c 49 44 5f 50 41 52 | 41 4d 45 54 45 52 20 72 |ALID_PAR|AMETER r|
|000004a0| 65 73 75 6c 74 73 20 69 | 6e 20 74 68 65 20 63 61 |esults i|n the ca|
|000004b0| 6c 6c 20 74 6f 20 57 72 | 69 74 65 46 69 6c 65 28 |ll to Wr|iteFile(|
|000004c0| 29 2e 0a 3e 20 43 61 6e | 20 61 6e 79 62 6f 64 79 |)..> Can| anybody|
|000004d0| 20 6f 66 66 65 72 20 6d | 65 20 73 6f 6d 65 20 68 | offer m|e some h|
|000004e0| 69 6e 74 73 3f 20 20 54 | 68 61 6e 6b 73 20 69 6e |ints? T|hanks in|
|000004f0| 20 61 64 76 61 6e 63 65 | 2e 0a 3e 20 0a 3e 20 52 | advance|..> .> R|
|00000500| 67 64 73 2c 0a 3e 20 57 | 69 6e 6e 69 65 0a 0a 0a |gds,.> W|innie...|
|00000510| 49 27 6d 20 74 72 79 69 | 6e 67 20 74 6f 20 77 72 |I'm tryi|ng to wr|
|00000520| 69 74 65 20 61 20 73 6d | 61 6c 6c 20 6d 6f 64 65 |ite a sm|all mode|
|00000530| 6d 20 64 69 61 6c 65 72 | 20 6d 79 73 65 6c 66 20 |m dialer| myself |
|00000540| 77 72 69 74 65 20 6e 6f | 77 2c 20 75 73 69 6e 67 |write no|w, using|
|00000550| 20 74 68 65 20 63 6f 6d | 6d 20 0a 70 6f 72 74 2e | the com|m .port.|
|00000560| 20 20 59 6f 75 20 73 68 | 6f 75 6c 64 20 6c 6f 6f | You sh|ould loo|
|00000570| 6b 20 69 6e 20 74 68 65 | 20 41 50 49 20 66 6f 72 |k in the| API for|
|00000580| 20 4f 70 65 6e 43 6f 6d | 6d 2c 20 43 6c 6f 73 65 | OpenCom|m, Close|
|00000590| 43 6f 6d 6d 2c 20 57 72 | 69 74 65 43 6f 6d 6d 2c |Comm, Wr|iteComm,|
|000005a0| 20 0a 52 65 61 64 43 6f | 6d 6d 2c 20 47 65 74 43 | .ReadCo|mm, GetC|
|000005b0| 6f 6d 6d 53 74 61 74 65 | 2c 20 53 65 74 43 6f 6d |ommState|, SetCom|
|000005c0| 6d 53 74 61 74 65 2c 20 | 47 65 74 43 6f 6d 6d 45 |mState, |GetCommE|
|000005d0| 72 72 6f 72 2c 20 61 6e | 64 20 42 75 69 6c 64 43 |rror, an|d BuildC|
|000005e0| 6f 6d 6d 44 43 42 2e 0a | 0a 4a 61 6d 65 73 20 4f |ommDCB..|.James O|
|000005f0| 27 43 6f 6e 6e 6f 72 0a | 6f 63 6f 6e 6e 6f 72 40 |'Connor.|oconnor@|
|00000600| 61 70 63 69 2e 6e 65 74 | 0a |apci.net|. |
+--------+-------------------------+-------------------------+--------+--------+